Be careful about the list of event controllers
authorMatthias Clasen <mclasen@redhat.com>
Fri, 9 May 2014 19:53:27 +0000 (15:53 -0400)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 23 May 2014 17:54:30 +0000 (19:54 +0200)
commitbad1dd4ac76e304a3b587cfb35cae6fe105d2037
tree7f026a48ff4dca37d9c0a0104f14e9bea2dc13d7
parentd97e4bf6b71fa6cffb8895310ed00ba59db6f4c0
Be careful about the list of event controllers

We can end up with _gtk_widget_remove_controller getting called
while we are iterating over the list in _gtk_widget_run_controllers.
To avoid trouble, only mark the event controller as dead by
setting data->controller to NULL, and defer the actual freeing
and list manipulation to the loop in _gtk_widget_run_controllers.
Update other places that operate on controllers to handle
data->controller being NULL.
gtk/gtkwidget.c